import http from "@/utils/http.js"

const url = {
    // 上传文件
    learningCenterUpload: "/lab/learningCenter/upload",
    // 分页查询文件信息
    learningCenterQueryFile: "/lab/learningCenter/queryFile",
    // 编辑
    learningCenterEditFile: "/lab/learningCenter/editFile",
    // 删除
    learningCenterDeleteFile: "/lab/learningCenter/deleteFile/",
    // 置顶
    learningCenterTopFile: "/lab/learningCenter/topFile/",
    // 置顶
    learningCenterCancelTopFile: "/lab/learningCenter/cancelTopFile/",
}

export default {
    url: url,
    // 上传文件
    learningCenterUpload(params) {
        return http.post(url.learningCenterUpload, params, 'formData')
    },
    // 分页查询文件信息
    learningCenterQueryFile(params) {
        return http.post(url.learningCenterQueryFile, params)
    },
    // 编辑
    learningCenterEditFile(params) {
        return http.post(url.learningCenterEditFile, params)
    },
    // 删除
    learningCenterDeleteFile(params) {
        return http.post(url.learningCenterDeleteFile + params.id)
    },
    // 删除
    learningCenterTopFile(params) {
        return http.post(url.learningCenterTopFile + params.id)
    },
    // 删除
    learningCenterCancelTopFile(params) {
        return http.post(url.learningCenterCancelTopFile + params.id)
    },
}